<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/struts-tags" prefix="s" %>  

<!DOCTYPE html>
<html lang="zh">
<head>        
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    
    <!--[if gt IE 8]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />        
    <![endif]-->        
    
    <title>报名系统</title>
    
    <%@include file="res.jsp" %>
    
    <%@include file="htmledit.jsp"%>
    
</head>
<body>    

    <jsp:include page="header.jsp"></jsp:include>

	<jsp:include page="menu.jsp"></jsp:include>
    
    <jsp:include page="com_bbs.jsp"></jsp:include>
	
    <div class="content">

<div class="row-fluid">
            
            <div class="span12">                

                <div class="widget">
                    <div class="head dark">
                        <div class="icon"><i class="icos-pencil2"></i></div>
                        <h2>添加报名</h2>
                    </div>  
                    <form action="page/singup_add.action" method="post" id="validate" enctype="multipart/form-data">               
                    <div class="block-fluid">

                        <div class="row-form">
                            <div class="span1">标题:</div>
                            <div class="span10">
                            	<input type="text" class="validate[required],minSize[2],maxSize[40]" name="title" placeholder="标题">
                            	<span class="bottom" style="color:red"><s:fielderror fieldName="title"/></span>
                            </div>
                        </div>
                        
                       <div class="row-form">
								<div class="span1">
									海报 
								</div>
								<div class="span10">  
									<c:choose> 
										<c:when test="${fn:contains(header['User-Agent'],'Chrome') || fn:contains(header['User-Agent'],'Firefox')}">
											 <div class="input-append file"> 
												  <input class="validate[required]" type="file"name="pic" >
		                                   	 	  <input class="validate[required]" placeholder=""  type="text" > 
											  </div>
										</c:when>
										<c:otherwise> 
										 		<input class="validate[required]" type="file"name="pic" >
										</c:otherwise>
									</c:choose> 
									<span class="bottom" style="color:red"><s:fielderror fieldName="pic"/></span>
								</div>
							</div>
                        <div class="row-form">
                            <div class="span1">内容:</div>
                            <div class="span10">
                            	<textarea name="content" class="validate[required],minSize[3]" style="height:300px;" placeholder="Placeholder example">
                            	</textarea>
                            	<span class="bottom" style="color:red"><s:fielderror fieldName="content"/></span></div>
                        </div>
 						<div class="row-form">
                            <div class="span1">标识码:</div>
                            <div class="span5"><input type="text" name="code" placeholder="默认为空">
                            <span class="bottom">用户报名的时间写,防止过度报名</span> 
                            <span class="bottom" style="color:red"><s:fielderror fieldName="code"/></span></div>
                            
                        </div>  
                        <div class="row-form">
                            <div class="span1">结束:</div>
                            <div class="span5"><input type="text" id="datepicker"  class="validate[required,custom[date]]" name="endTime" placeholder="结束的时间">
                            <span class="bottom" style="color:red"><s:fielderror fieldName="endTime"/></span>
                            <span class="bottom">必须, 格式为&nbsp;&nbsp;2015-11-11&nbsp;&nbsp;(建议复制修改)</span></div>
                        	
                        </div> 
                              
                        <div class="toolbar bottom TAL">
                             <div class="btn-group">
									<button onclick="$('#validate').validationEngine('hide');" type="button" class="btn btn-info">隐藏</button>
									<button class="btn btn-primary">
										发布
									</button>
								</div>
                        </div>

                    </div>
                    </form>
                </div> 
            </div>
             
        </div>

    </div>  
 
</body>
</html>
